{extend name='admin@main'}
{block name='content'}
<style>
    .store-total-container {
        font-size: 14px;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    .store-total-container .store-total-item > div:nth-child(2) {
        font-size: 46px;
        line-height: 46px;
    }
    @media screen and (min-device-width: 992px) {
        .game_distribution {
            width: 50%;
        }
    }
    ::-webkit-scrollbar {width: 10px;height: 10px;background-color: rgba(240, 240, 240, 1);}
</style>
<div class="think-box-shadow">
    {include file='user/index_search'}
    <div class="think-box-shadow store-total-container notselect" >
        <div class="layui-row layui-col-space15">
            <div class="margin-bottom-15">平台在线人数 <b style="font-size: 12px;color: #ccc;"></b></div>
            <div id="time_online" style="height:400px;" >
            </div>
        </div>
    </div>
    {include file='user/index_channel_search'}
    <div class="think-box-shadow store-total-container notselect" >
        <div class="layui-row layui-col-space15">
            <div class="margin-bottom-15">玩家渠道在线人数 <b style="font-size: 12px;color: #ccc;"></b></div>
            <div id="time_channel_online" style="height:400px;" >
            </div>
        </div>
    </div>
    {include file='user/index_room_search'}
    <div class="think-box-shadow store-total-container notselect" >
        <div class="layui-row layui-col-space15">
            <div class="margin-bottom-15">玩家房间在线人数 <b style="font-size: 12px;color: #ccc;"></b></div>
            <div id="time_room_online" style="height:400px;" >
            </div>
        </div>
    </div>
    <script>
        require(['echarts'], function (echarts, chart) {
            chart = echarts.init(document.getElementById('time_online'));
            window.onresize = chart.resize;
            option = {
                tooltip : {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985'
                        }
                    }
                },
                legend: {
                    data:['平台在线人数']
                },
                toolbox: {
                    orient: 'vertical',
                    x: 'right',
                    y: 'center',
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
                grid: {
                    left: '3%',
                    right: '8%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis : [
                    {
                        type : 'category',
                        boundaryGap : false,
                        data :eval('{:json_encode($user_online_trend.time)}')
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        axisLabel: {
                            color: '#2f9de2',
                            formatter: "{value}人"
                        },
                        splitLine: {
                            lineStyle: {
                                type: 'dashed',
                                color: '#cccccc'
                            }
                        }
                    }
                ],
                series : [
                    {
                        name:'平台在线人数',
                        type:'line',
                        stack: '总量',
                        data: eval('{:json_encode($user_online_trend.count)}'),
                        lineStyle: {
                            normal: {
                                color: '#2f9de2',
                                width: 1,
                                /*type: 'dashed'*/
                            }
                        },
                        itemStyle: {
                            normal: {
                                borderWidth: 1,
                                borderColor: '#ff7d7d',
                                color: '#c543d8'
                            }
                        }
                    },
                ]
            };
            chart.setOption(option);
        });
    </script>
    <script>
        require(['echarts'], function (echarts, chart) {
            chart = echarts.init(document.getElementById('time_channel_online'));
            window.onresize = chart.resize;
            option = {
                tooltip : {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985'
                        }
                    }
                },
                legend: {
                    data:['玩家渠道用户走势']
                },
                toolbox: {
                    orient: 'vertical',
                    x: 'right',
                    y: 'center',
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
                grid: {
                    left: '3%',
                    right: '8%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis : [
                    {
                        type : 'category',
                        boundaryGap : false,
                        data :eval('{:json_encode($user_online_channel_trend.time)}')
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        axisLabel: {
                            color: '#2f9de2',
                            formatter: "{value}人"
                        },
                        splitLine: {
                            lineStyle: {
                                type: 'dashed',
                                color: '#cccccc'
                            }
                        },
                        minInterval: 1
                    }
                ],
                series : [
                    {
                        name:'玩家渠道用户走势',
                        type:'line',
                        stack: '总量',
                        data: eval('{:json_encode($user_online_channel_trend.count)}'),
                        lineStyle: {
                            normal: {
                                color: '#a559e2',
                                width: 1,
                                /*type: 'dashed'*/
                            }
                        },
                        itemStyle: {
                            normal: {
                                borderWidth: 1,
                                borderColor: '#2b82ff',
                                color: '#21d890'
                            }
                        }
                    },
                ]
            };
            chart.setOption(option);
        });
    </script>
    <script>
        require(['echarts'], function (echarts, chart) {
            chart = echarts.init(document.getElementById('time_room_online'));
            window.onresize = chart.resize;
            option = {
                tooltip : {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985'
                        }
                    }
                },
                legend: {
                    data:['房间在线用户走势']
                },
                toolbox: {
                    orient: 'vertical',
                    x: 'right',
                    y: 'center',
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
                grid: {
                    left: '3%',
                    right: '8%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis : [
                    {
                        type : 'category',
                        boundaryGap : false,
                        data :eval('{:json_encode($user_online_room_trend.time)}')
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        axisLabel: {
                            color: '#2f9de2',
                            formatter: "{value}人"
                        },
                        splitLine: {
                            lineStyle: {
                                type: 'dashed',
                                color: '#cccccc'
                            }
                        },
                        minInterval: 1
                    }
                ],
                series : [
                    {
                        name:'房间在线用户走势',
                        type:'line',
                        stack: '总量',
                        data: eval('{:json_encode($user_online_room_trend.count)}'),
                        lineStyle: {
                            normal: {
                                color: '#a559e2',
                                width: 1,
                                /*type: 'dashed'*/
                            }
                        },
                        itemStyle: {
                            normal: {
                                borderWidth: 1,
                                borderColor: '#2b82ff',
                                color: '#21d890'
                            }
                        }
                    },
                ]
            };
            chart.setOption(option);
        });
    </script>
    {/block}
</div>